package com.study.sort;

import java.util.Arrays;

public class SortMain {

    public static void main(String[] args) {

        int[] ints = getInts(100000);
        System.out.println(Arrays.toString(ints));

        BubbleSort bubbleSort = new BubbleSort();
        bubbleSort.run(ints.clone());

        QuickSort quickSort = new QuickSort();
        quickSort.run(ints.clone());

        MergeSort mergeSort = new MergeSort();
        mergeSort.run(ints.clone());

    }

    public static int[] getInts(int length) {
        int[] ints = new int[length];

        for (int i = 0; i < length; i++) {
            ints[i] = (int) (Math.random() * 1000);
        }
        return ints;
    }

    public static int[] getInts(int limit, int length) {
        int[] ints = new int[length];

        for (int i = 0; i < length; i++) {
            ints[i] = (int) (Math.random() * limit);
        }
        return ints;
    }

}
